using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;

namespace TST.SharePoint.Shared
{
    public class WSSFieldCustom : FieldCustom
    {
        private SPField _field;

        /// <summary>
        /// Constructor.
        /// </summary>
        public WSSFieldCustom()
        {
        }

        public WSSFieldCustom(SPField field)
            : base(field.Id.ToString())
        {
            _field = field;
        }

        public override object GetTypedValue(object value)
        {
            if (value == null || _field==null)
                return null;
            return _field.GetFieldValueAsHtml(value);
        }

    }
}
